const state = {
  price: 10,
  sold: 2
}
const mutations = {
  CHANGE_PRICE: (state, num) => {
    state.price += num
  },
  CHANGE_SOLD: (state, num) => {
    state.sold += num
  }
}
const actions = {
  changePrice ({ commit }, num) {
    commit('CHANGE_PRICE', num)
  },
  changeSold ({ commit }, num) {
    commit('CHANGE_SOLD', num)
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
